Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 7: Scaling Shapes

../ch07/07fig09.gif
Figure 7.9

A simple spaceship built with a cylinder and a sphere, each scaled within its own coordinate system.

07fig09.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
    children [
    # Wing
        Transform {
            scale 0.5 1.0 1.5
            children Shape {
                appearance DEF White Appearance {
                    material Material { }
                }
                geometry Cylinder {
                    radius 1.0
                    height 0.025
                }
            }
        },
    # Fuselage
        Transform {
            scale 2.0 0.2 0.5
            children Shape {
                appearance USE White
                geometry Sphere { }
            }
        }
    ]
}